package com.example.demo.dao;

import com.example.demo.bean.Medical;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface MedicalDao {

    /*查询数据*/
    @Select("select * from medical")
    List<Medical> medical();

    /*新增数据*/
    @Insert("insert into medical (type) values(#{type})")
    void addMedical(String type);

    /*删除数据*/
    @Delete("delete from medical where medicalID=#{medicalID}")
    void deleteMedical(String type);

    /*修改数据*/
    @Update("update medical set type=#{type} where medicalID=#{medicalID}")
    void updateMedical(Medical medical);


}


